The present invention relates to a local network system for interconnecting computer devices, such as cash registers, scattered in a relatively small area, and more particularly to a data transmission control device in such a local network system for controlling buffering of data, assembly and disassembly of packets, access to the network system, and other operations.
Data transmission control is effected in a local network system generally as described below. Each one of a plurality of reception terminals connected to a transmission line reads a destination terminal address contained in a header part of a data packet, and, if the address agrees with an address of its own, it reads the succeeding data. If no error is detected in the data as a result of a CRC (Cyclic Redundancy Codes) check, then the terminal sends an ACK (acknowledge) packet back to the transmission terminal. If the data contains an error, then the received data is discarded. The transmission terminal measures time with a timer after it has transmitted the data packet, and transmits the data packet once again when no ACK packet is received within a certain period of time. For stricter data transmission control, the transmission terminal transmits a RACK packet to the reception terminal when an ACK packet is received.
The forgoing data transmission control has heretofore been executed by an application program stored in each terminal. A controller which connects a main system in each terminal to the transmission line has merely disassembled packets and effected data level conversion (conversion of voltage and logic levels). However, the application program required has increased the burden on the main system, resulting in a reduction in the efficiency of performing a task. Since retransmission of data and generation of packets are carried out by a hierarchically high application program, error correction and data collision prevention cannot be effected efficiently and speedily, and the data transmission control has had no sufficient reliability and high-speed operation.
A collision occurs on the transmission line when a plurality of terminals simultaneously access a transmitted data packet. To cope with this, any data transmission over the transmission line is prohibited immediately after such a collision has been detected, and upon elapse of a prescribed interval of time, the transmission line is opened to permit the data packet to be transmitted again. This mode of control is usually called "back-off processing" in which a back-off timer value for controlling a time until the data packet is transmitted again is picked up from a table of random numbers, possessed by each terminal, each time a collision takes place.
The prior back-off processing has individually detected elimination of a carrier signal in each terminal, and started the timer on such detection. However, if the back-off timer is started only on the condition that there is no carrier signal on the line, then the time required for transmitting the ACK and RACK packets subsequently to the transmission of the data packet is included in a period of time set by the back-off timer. This gives rise to the possibility of these response packets colliding with any data packet retransmitted upon elapse of the time set by the back-off timer. Since the terminals which have caused a collision separately start the back-off timers, the probability that the time intervals set by the timers do not elapse simultaneously is not reduced, and hence the accuracy of the back-off processing cannot be increased.
When a reception buffer is full, any data to be transmitted which is of higher priority cannot successfully be transmitted and the transmission line becomes initialized, resulting in an increase in the period of time it takes for the empty reception buffer to receive subsequent data. The controller has only one reception buffer so that the data will be processed in the terminal device in the order they have been received. This is disadvantageous in that any data of higher priority cannot be processed immediately.
An ACK error occurs when an ACK packet is received by the transmission terminal which has not yet been readied for receiving such an ACK packet after it has transmitted a data packet. To prevent this error, it is necessary to synchronize operation modes of the transmission and reception terminals. It has been customary to allow a data packet reception terminal to provide a fixed idle or delay time after a data packet has been received, and then to send a response packet upon elapse of such a fixed idle time.
This system however has a drawback in that the delay time is generated irrespective of the operation mode of the transmission terminal, and no response packet may be transmitted even when the transmission terminal is ready to receive such a packet. Such a situation manifests itself where there are various terminals of low- and high-speed operation. The idle time should be matched for the terminal which operate at the lowest speed, and the idle time may become relatively too long for the time required for a high-speed transmission terminal, which transmits a data packet, to be readied for receiving a response packet. Therefore, the data transmission control system of the type described has required the terminals to be matched in performance and cannot increase a transmission efficiency.
A system which utilizes a packet format with flags attached to the beginning and terminal ends of a data packet enables a reception terminal to determine the completion of reception of the packet by detecting the flag at the terminal end of the data packet during the foregoing data transmission control. When the terminal flag is detected, the reception terminal prepares for transmitting a response packet such as an ACK packet or an NRDY packet to the terminal having transmitted the data packet.
The above data transmission control however tends to cause the reception terminal to fail to normally receive the retransmitted packet when there is a collision at the time of data packet transmission. This is because data transmission is interrupted when a collision occurs and a reception terminal is brought into a condition waiting for data at the time of interruption of data transmission, and that reception terminal will process any retransmitted data packet as being contiguous to the data previously received. More specifically, the starting flag of any retransmitted data packet is regarded as the ending flag of the preceeding data packet (which has been cut off), and the data is processed as being subjected to an error due to a reduced data length. The retransmitted data packet which is successively received is also processed as an error data packet since it is interpreted as containing no starting flag. As a consequence, the retransmitted data packet after the collision cannot be properly received by the reception terminal.